package ooday02;

public class Student extends Person{
    String stuId;
    String className;
    Student(String name,int age,String address,String stuId,String className){
        super(name,age,address);
        this.stuId=stuId;
        this.className=className;
    }

        //成员变量name若没有同名现象，写thes.name和super.name都一样
        //成员变量name若有同名现象
        //1)super.name指的是超类的name,this.name指的是当前类的name

    void study(){
        System.out.println(name+"正在学习");
    }
    void  sayHi(){
        System.out.println("大家好，我是"+name+"今年"+age+"岁，家住"+address+"学号"+stuId);
    }
}
